﻿Public Class formvnclocal

    Private Sub btnvnclocal_Click(sender As Object, e As EventArgs) Handles btnvnclocal.Click
        Dim parametros2 As String


        ' parametros = "/user %username% /password" + passdomain
        parametros2 = textipvnclocal.Text
        lbnerrorlocal.Text = ""
        If textipvnclocal.Text = "" Then
            MsgBox("Please Insert IP Address", MsgBoxStyle.Exclamation)
            Return
        End If

        If My.Computer.Network.Ping(parametros2) = True Then

            Dim oProcess As New Process()
            Dim oStartInfo As New ProcessStartInfo("c:\program files\TechTools\vncviewer.exe", parametros2 & " " & "/viewonly" & " " & "/user uvnc" & " " & "/password Georgina69")
            oStartInfo.UseShellExecute = False
            oStartInfo.RedirectStandardOutput = True
            oProcess.StartInfo = oStartInfo
            oProcess.Start()
            textipvnclocal.Clear()
        Else
            lbnerrorlocal.Text = "IP Addres is shutdown or Incorrect"
            textipvnclocal.Clear()
            Return

        End If






    End Sub

    Private Sub btnclose_Click(sender As Object, e As EventArgs)
        Me.Close()

    End Sub
End Class